#if !defined(ximera_graphics_ogre_viewport_hpp)
#define ximera_graphics_ogre_viewport_hpp

// -----------------------------------------------------------

#include <ximera/graphics/iviewport.hpp>
#include <ximera/common/sharedptr.hpp>
#include <OgreViewport.h>

namespace ximera { namespace graphics { namespace ogre
{
    class GraphicsSystem;
    class Camera;

    class XIMERA_PLUGIN_API Viewport : public graphics::IViewport
    {
    public:
        Viewport(GraphicsSystem* graphicsSystem, Camera* camera);
        virtual ~Viewport();

        virtual Real left() const;
        virtual Real actualLeft() const;
        virtual void left(Real value);

        virtual Real top() const;
        virtual Real actualTop() const;
        virtual void top(Real value);

        virtual Real width() const;
        virtual Real actualWidth() const;
        virtual void width(Real value);

        virtual Real height() const;
        virtual Real actualHeight() const;
        virtual void height(Real value);

        virtual void resize(Real left, Real top, Real width, Real height);        

        virtual ICamera* camera();
        virtual void camera(ICamera* cam);

        virtual math::Color backgroundColor() const;
        virtual void backgroundColor(math::Color const& color);

    private:
        Ogre::Viewport* _ogreViewport;
        Camera* _camera;

        GraphicsSystem* _graphicsSystem;
    };
}}}

// -----------------------------------------------------------

#endif
